package model

type AnswerRecordCreateRequest struct {
	Id          int64  `json:"id"`
	UserId      string `json:"user_id"`
	Difficulty  int    `json:"difficulty"`
	FirstLevel  int    `json:"first_level"`
	SecondLevel int    `json:"second_level"`
	Desc        string `json:"desc"`
	AnswerValue string `json:"answer_value"`
	CorrectNum  int    `json:"correct_num"`
	Total       int    `json:"total"`
	Star        int    `json:"star"`
	CreatedAt   int64  `json:"created_at"`
	UpdatedAt   int64  `json:"updated_at"`
}
type AnswerRecordUpdateRequest struct {
	Id          int64   `json:"id"`
	UserId      *string `json:"user_id"`
	Difficulty  *int    `json:"difficulty"`
	FirstLevel  *int    `json:"first_level"`
	SecondLevel *int    `json:"second_level"`
	Desc        *string `json:"desc"`
	AnswerValue *string `json:"answer_value"`
	CorrectNum  *int    `json:"correct_num"`
	Total       *int    `json:"total"`
	Star        *int    `json:"star"`
	CreatedAt   *int64  `json:"created_at"`
	UpdatedAt   *int64  `json:"updated_at"`
}
type AnswerRecordListRequest struct {
	Id          int64   `json:"id"`
	UserId      *string `json:"user_id"`
	Difficulty  *int    `json:"difficulty"`
	FirstLevel  *int    `json:"first_level"`
	SecondLevel *int    `json:"second_level"`
	Desc        *string `json:"desc"`
	AnswerValue *string `json:"answer_value"`
	CorrectNum  *int    `json:"correct_num"`
	Total       *int    `json:"total"`
	Star        *int    `json:"star"`
	CreatedAt   *int64  `json:"created_at"`
	UpdatedAt   *int64  `json:"updated_at"`
	Index       int     `json:"index"`
	Size        int     `json:"size"`
}
type AnswerRecordListResponse struct {
	Total int                 `json:"total"`
	List  []*AnswerRecordInfo `json:"list"`
}
type AnswerRecordInfoRequest struct {
	Id          int64  `json:"id"`
	UserId      string `json:"user_id"`
	FirstLevel  int    `json:"first_level"`
	SecondLevel int    `json:"second_level"`
}
type AnswerRecordInfo struct {
	Id           int64         `json:"id"`
	UserId       string        `json:"user_id"`
	Difficulty   int           `json:"difficulty"`
	FirstLevel   int           `json:"first_level"`
	SecondLevel  int           `json:"second_level"`
	Desc         string        `json:"desc"`
	AnswerValue  string        `json:"answer_value"`
	CorrectNum   int           `json:"correct_num"`
	Total        int           `json:"total"`
	Star         int           `json:"star"`
	CreatedAt    int64         `json:"created_at"`
	UpdatedAt    int64         `json:"updated_at"`
	AnswerValues []*AnswerData `json:"answer_values"`
}
type AnswerRecordDeleteRequest struct {
	Id int64 `json:"id"`
}

type AnswerData struct {
	Id      int64   `json:"id"`
	Result  []int64 `json:"result"`  // 结果ID
	Correct int     `json:"correct"` // 0 错误 1 正确
	Extra   string  `json:"extra"`   // 扩展字段
}
